package com.ss.android.article.base.feature.user.account.view;

import android.app.DatePickerDialog;
import android.view.View;
import android.widget.DatePicker;

import com.bytedance.common.utility.UIUtils;
import com.ss.android.article.browser.R;

import java.util.Calendar;

final class j implements DatePickerDialog.OnDateSetListener {
    private final a a;

    j(a arg1) {
        this.a = arg1;
    }

    public final void onDateSet(DatePicker arg6, int arg7, int arg8, int arg9) {
        int v4 = 10;
        Calendar v0 = Calendar.getInstance();
        long v2 = v0.getTimeInMillis();
        v0.set(arg7, arg8, arg9);
        if (v0.getTimeInMillis() > v2) {
            UIUtils.showImageToast(this.a.getContext(), R.drawable.close_popup_textpage, R.string.g_);
        } else {
            StringBuilder v1 = new StringBuilder();
            v1.append(arg7);
            if (arg8 + 1 < v4) {
                v1.append("0");
            }

            v1.append(arg8 + 1);
            if (arg9 < v4) {
                v1.append("0");
            }

            v1.append(arg9);
            com.ss.android.article.base.feature.user.account.view.a.B(this.a).m = v1.toString();
            com.ss.android.article.base.feature.user.account.view.a.C(this.a).setVisibility(View.VISIBLE);
            com.ss.android.article.base.feature.user.account.view.a.D(this.a).g();
        }
    }
}

